<%@page import="study.top.mydb.items.PwQuestionItem"%>
<%@page import="study.top.mydb.PwQuestion"%>
<%@page import="study.top.mydb.items.MemberItem"%>
<%@page import="study.top.mydb.Member"%>
<%@page import="study.top.mydb.items.PaymentPItem"%>
<%@page import="study.top.mydb.PaymentP"%>
<%@page import="study.top.common.DateTime"%>
<%@page import="study.top.mydb.items.PaymentInfoItem"%>
<%@page import="java.util.ArrayList"%>
<%@page import="study.top.mydb.PaymentInfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ include file="dbcon.jsp" %>
<%
	int seq = web.getInt("seq");

	if (seq < 1) {
		web.openPopup("defaultPopup.jsp", null, "파라미터가 없습니다.");
	}

	Member mem = new Member();
	MemberItem m_item = mem.show(seq);
	
	// 패스워드 확인 질문리스트를 가져온다.
	PwQuestion pq = new PwQuestion();
	ArrayList<PwQuestionItem> pq_list = pq.selectQeustionList();
	
	// DB접속 해제
	db.disconnect();
	
	if (m_item == null || pq_list == null) {
		web.openPopup("defaultPopup.jsp", null, "회원정보를 가져오는데 실패하였습니다.");
	}
%>
<!DOCTYPE html>
<html lang="ko">
<%@include file="topHead.jsp" %>
	<body>
		<div class="top-container">
		<div class="top-page-header"></div>
		
		<div class="top-table-size1">		
		
		<a href="adminMypage.jsp"><input type="button" class="top-btn-custom" value="관리자페이지 바로가기"></a>
		<a href="aMemList.jsp?"><input type="button" class="top-btn-custom" value="회원리스트 바로가기"></a>
		<h1> 회원 상세보기 </h1>
<%
	if (m_item != null) {
%>	
		<fieldset>
			<div>
				<label for="seq" class="top-label1">회원번호</label>
				<input type="text" class="top-input" id="seq" value="<%=m_item.getSeq()%>">
			</div>
			<div>
				<label for="id" class="top-label1">아이디</label>
				<input type="text" class="top-input" id="id" value="<%=m_item.getId()%>">
			</div>
			<div>
				<label for="pw_question_seq" class="top-label1">패스워드 확인시 질문</label>
				<input type="text" class="top-input" id="pw_question_seq" value="<%=pq_list.get(m_item.getPw_question_seq()-1).getPw_Qeustion()%>">
			</div>
			<div>
				<label for="pw_as" class="top-label1">패스워드 확인시 답변</label>
				<input type="text" class="top-input" id="pw_as" name="pw_as" value="<%=m_item.getPw_as()%>" >
			</div>
			<div>
				<label for="name" class="top-label1">이름</label>
				<input type="text" class="top-input" value="<%=m_item.getName()%>">
			</div>
			<div>
				<label for="email" class="top-label1">이메일</label>
				<input type="text" class="top-input" id="email" name="email" value="<%=m_item.getEmail()%>">
			</div>
			<div>
				<label for="zipcode" class="top-label1">우편번호</label>
				<input type="text" class="top-input" id="zipcode" name="zipcode" value="<%=m_item.getZipcode()%>">
			</div>
			<div>
				<label for="add1" class="top-label1">주소1</label>
				<input type="text" class="top-input" id="add1" name="add1" value="<%=m_item.getAdd1()%>">
			</div>
			<div>
				<label for="add2" class="top-label1">주소2</label>
				<input type="text" class="top-input" id="add2" name="add2" value="<%=m_item.getAdd2()%>">
			</div>			
		</fieldset>
		
<%
	} else {
%>
		<fieldset>
			<div>
				<label for="seq" class="top-label1">회원정보가 없습니다.</label>
			</div>			
		</fieldset>
<%
	}
%>
		</div>
		</div>			

		<!-- Javascript -->
		<script src="assets/js/jquery.js"></script>
		<script src="assets/js/bootstrap.min.js"></script>
	</body>
</html>